﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace DbfViewer.Models
{
	public static class StringValidator
	{
		public static bool IsAlphaNumericWithUnderscore(string input)
		{
			return Regex.IsMatch(input, "^[a-zA-Z0-9_]+$");
		}

		public static bool IsAlpha(string input)
		{
			return Regex.IsMatch(input, "^[a-zA-Z]+$");
		}

		public static bool IsAlphaNumeric(string input)
		{
			return Regex.IsMatch(input, "^[a-zA-Z0-9]+$");
		}
	}
}
